﻿<%@ WebHandler Language="C#" Class="DeleteGroupNews" %>

using System;
using System.Web;

public class DeleteGroupNews : AdminHandler
{
    
    public override void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        if (IsAuthenticate(context))
        {
            if (IsAuthenticate(context))
            {
                try
                {
                    int gnid = 0;
                    if (context.Request.QueryString["gnid"] != null)
                        gnid = int.Parse(context.Request.QueryString["gnid"].ToString());

                    GroupNews obj = new GroupNews().UpdateStatusActive(gnid, 0);
                    context.Response.Write("OK");
                }
                catch (Exception ex)
                {
                    PMSA.Framework.Log.CLogManager.Write("DeleteGroupNews.ashx", ex.ToString(), "ADMIN");
                    context.Response.Write("FAIL");
                }
            }
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}